s_spline_matrix_dense__write Subroutine

private subroutine s_spline_matrix_dense__write(self, unit, fmt)

Type Bound

sll_t_spline_matrix_dense

Arguments

Type IntentOptional Attributes Name
class(sll_t_spline_matrix_dense), intent(in) :: self
integer, intent(in), optional :: unit
character(len=*), intent(in), optional :: fmt

Source Code

  subroutine s_spline_matrix_dense__write( self, unit, fmt )
    class(sll_t_spline_matrix_dense), intent(in) :: self
    integer         , optional      , intent(in) :: unit
    character(len=*), optional      , intent(in) :: fmt

    integer :: i
    integer :: unit_loc
    character(len=32) :: fmt_loc

    if ( present( unit ) ) then
      unit_loc = unit
    else
      unit_loc = output_unit
    end if

    if ( present( fmt  ) ) then
      fmt_loc = fmt
    else
      fmt_loc = 'es9.1'
    end if

    write(fmt_loc,'(a)') "('(',i0,'" // trim(fmt_loc) // ")')"
    write(fmt_loc,fmt_loc) size(self%a,2)

    write(unit_loc,*) 'factorized?=',self%factorized
    do i = 1, size(self%a,1)
      write(unit_loc,fmt_loc) self%a(i,:)
    end do

  end subroutine s_spline_matrix_dense__write