Class wavefunc_param_class
In: MeasureClass/wavefunc_param_class.F90
comlib lattice_class error_class wavefunc_param_class dot/f_77.png

This defined Wavefunction parameters Several parameters are defined for Coulomb-gauge fixing.

 - Local wavefunction
 - Exponential wavefunction
 - Wall wavefunction
 - Polynomial wavefunction
 - User defined wavefunction

Methods

Included Modules

comlib lattice_class error_class

Public Instance methods

EXP_WAV
Constant :
EXP_WAV =2 :integer, parameter
LOCAL_WAV
Constant :
LOCAL_WAV =1 :integer, parameter
MAXPOL_WAV
Constant :
MAXPOL_WAV =50 :integer, parameter
POLY_WAV
Constant :
POLY_WAV =4 :integer, parameter
USER_WAV
Constant :
USER_WAV =5 :integer, parameter
WALL_WAV
Constant :
WALL_WAV =3 :integer, parameter
Subroutine :
this :type(wavefunc_param_obj), intent(inout)

[Source]

subroutine delete_wavefunc_param(this)
  implicit none
  type(wavefunc_param_obj), intent(inout) :: this
  call new(this)
  return
end subroutine
Subroutine :
this :type(wavefunc_param_obj), intent(inout)

[Source]

subroutine new_wavefunc_param(this)
  implicit none
  type(wavefunc_param_obj), intent(inout) :: this
  this%type      = LOCAL_WAV
  this%Npolsf    = 0
  this%Asmear    = 1.0_DP
  this%Bsmear    = 0.0_DP
  this%Psmear(:) = 0.0_DP
  return
end subroutine
Subroutine :
this :type(wavefunc_param_obj), intent(inout)

print out wavefunction parameters on display

[Source]

subroutine print_wavefunc_param(this)
!
! print out wavefunction parameters on display
!
  implicit none
  type(wavefunc_param_obj), intent(inout) :: this
  integer :: i

  if (nodeid==0) then
    write(*,'("==== Wave function Parameters ====")')

    select case(this%type)
    case (LOCAL_WAV)
    write(*,'(3X," Local Wave function")')
    case (EXP_WAV)
    write(*,'(3X," Exponential Wave function")')
    write(*,'(3X,"          Asmear :",E24.16)')this%Asmear
    write(*,'(3X,"          Bsmear :",E24.16)')this%Bsmear
    case (WALL_WAV)
    write(*,'(3X," Wall Wave function")')
    case (POLY_WAV)
    write(*,'(3X," Polynomial Wave function")')
    write(*,'(3X,"           Order :",I3)')this%Npolsf
    write(*,'(3X,"       Psmear(:) :",100E24.16)') (this%Psmear(i),i=1,this%Npolsf)
    end select
    write(*,'(80("="))')
  endif

  return
end subroutine
Subroutine :
this :type(wavefunc_param_obj), intent(inout)
iout :integer, intent(in)

read wavefunction prameters from a file

[Source]

subroutine read_wavefunc_param(this,iout)
!
! read wavefunction prameters from a file
!
  use error_class
  implicit none
  type(wavefunc_param_obj), intent(inout) :: this
  integer,                  intent(in)    :: iout
  character(len=CHARLEN) :: str
  integer :: ierr,i

  if (nodeid==0) then
    read(iout,*) this%type
  endif
  if (NPU>1) then
    call comlib_bcast(this%type,0)
  endif

  if ( this%type < 1 .and. this%type > 5) then
    call error_message(" Wave function type error.")
    call    error_stop(" type = 1:loc, 2:exp, 3:wall, 4:pol, 5:usr")
  endif
 
  ierr = 0
  if (nodeid==0) then
    select case(this%type)
    case(LOCAL_WAV)
      continue
    case(WALL_WAV)
      continue
    case(EXP_WAV)
      read(iout,*)this%Asmear,this%Bsmear 
    case(POLY_WAV)
      read(iout,*) this%Npolsf 
      if (this%Npolsf > MAXPOL_WAV) then
        ierr=1
        goto 100
      endif
      read(iout,*)(this%Psmear(i),i=1,this%Npolsf) ! read polynomial coeffcients
    end select
  endif

100 continue
  if (ierr == 1) then
    write(str,'(" Error Npolsf =",I3," > MAXPOL_WAV =",I3)') this%Npolsf,MAXPOL_WAV
    call error_stop(TRIM(str))
  endif

#ifndef _singlePU
  if (NPU>1) then
    call comlib_bcast(this%Asmear,0)
    call comlib_bcast(this%Bsmear,0)
    call comlib_bcast(this%Npolsf,0)

    if (this%type == POLY_WAV) then
      do i=1,this%Npolsf
        call comlib_bcast(this%Psmear(i),0)
      enddo
    endif
  endif
#endif

  return
end subroutine
wavefunc_param_obj
Derived Type :
type :integer
: 1 for local, 2 for exponential, 3 for wall, 4 for polynomial, 5 user supplied
Npolsf :integer
: number of polynomial coeffciient
idummy(2) :integer
Asmear :real(DP)
: exponetial parameter, psi(r)=A*exp(-r*B)
Bsmear :real(DP)
: exponetial parameter, psi(r)=A*exp(-r*B)
Psmear(MAXPOL_WAV) :real(DP)
: polynomial coeffcient, psi(r)= 1 - sum_(i=1,Npol) P(i)*r^i

quark source function parameters