solid_set_SetReadFileName Subroutine

private pure subroutine solid_set_SetReadFileName(this, name)

Sets the names of files to read.

Type Bound

solid_set

Arguments

Type IntentOptional Attributes Name
class(solid_set), intent(inout) :: this

A collection of solids

character(len=*), intent(in) :: name

Name of file


Called by

proc~~solid_set_setreadfilename~~CalledByGraph proc~solid_set_setreadfilename solid_set%solid_set_SetReadFileName proc~solid_set_init solid_set%solid_set_Init proc~solid_set_init->proc~solid_set_setreadfilename

Source Code

    pure subroutine solid_set_SetReadFileName(this,name)
      !> Sets the names of files to read.
      class(solid_set), intent(inout) :: this                                  !! A collection of solids
      character(len=*), intent(in)    :: name                                  !! Name of file
      ! Work variables
      integer :: pos, n

      ! Store the base name with no extensions
      pos=scan(trim(adjustl(name)),".",BACK=.true.)
      if (pos.gt.0) then
        this%read_file=name(1:pos-1)
      else
        this%read_file=name
      end if
      do n=1,this%count
        write(this%p(n)%read_file,fmt='(a,i6.6,a)') trim(adjustl(this%read_file))//'_',n,'.h5'
      end do

      this%read_file=trim(adjustl(this%read_file))//'.h5'
      return
    end subroutine solid_set_SetReadFileName