pdf_print_pfile_1d Subroutine

subroutine pdf_print_pfile_1d(self, pfile, normalize)

Arguments

Type IntentOptional Attributes Name
type(pdf_kernel) :: self
character(len=*) :: pfile
logical, optional :: normalize

Calls

proc~~pdf_print_pfile_1d~2~~CallsGraph proc~pdf_print_pfile_1d~2 pdf_print_pfile_1d free_unit free_unit proc~pdf_print_pfile_1d~2->free_unit pdf pdf proc~pdf_print_pfile_1d~2->pdf pdf_normalize_1d pdf_normalize_1d proc~pdf_print_pfile_1d~2->pdf_normalize_1d x x proc~pdf_print_pfile_1d~2->x

Source Code

subroutine pdf_print_pfile_1d(self,pfile,normalize)
  type(pdf_kernel) :: self    
  character(len=*) :: pfile
  logical,optional :: normalize
  logical          :: normalize_
  integer          :: i,unit
  if(.not.self%status)stop "PDF_WRITE: PDF not allocated"
  normalize_ = .true.; if(present(normalize))normalize_=normalize
  if(normalize_)call pdf_normalize_1d(self)
  open(free_unit(unit),file=trim(pfile),access='append')
  do i=1,self%N
     write(unit,*)self%x(i),self%pdf(i)
  enddo
  write(unit,*)
  close(unit)
end subroutine pdf_print_pfile_1d