VTK_VAR_VECT_I4 Function

private function VTK_VAR_VECT_I4(NC_NN, varname, varX, varY, varZ) result(E_IO)

Function for saving field of vectorial variable (I4P).

Arguments

Type IntentOptional AttributesName
integer(kind=I4P), intent(in) :: NC_NN
character(len=*), intent(in) :: varname
integer(kind=I4P), intent(in) :: varX(1:NC_NN)
integer(kind=I4P), intent(in) :: varY(1:NC_NN)
integer(kind=I4P), intent(in) :: varZ(1:NC_NN)

Return Value integer(kind=I4P)


Called by

proc~~vtk_var_vect_i4~~CalledByGraph proc~vtk_var_vect_i4 VTK_VAR_VECT_I4 interface~vtk_var VTK_VAR interface~vtk_var->proc~vtk_var_vect_i4 proc~save_fe_f_vtk save_fe_f_vtk proc~save_fe_f_vtk->interface~vtk_var

Contents

Source Code


Source Code

  function VTK_VAR_VECT_I4(NC_NN,varname,varX,varY,varZ) result(E_IO)
  !---------------------------------------------------------------------------------------------------------------------------------
  !! Function for saving field of vectorial variable (I4P).
  !---------------------------------------------------------------------------------------------------------------------------------

  !---------------------------------------------------------------------------------------------------------------------------------
  implicit none
  integer(I4P), intent(IN):: NC_NN         ! number of nodes or cells
  character(*), intent(IN):: varname       ! variable name
  integer(I4P), intent(IN):: varX(1:NC_NN) ! x component of vector
  integer(I4P), intent(IN):: varY(1:NC_NN) ! y component of vector
  integer(I4P), intent(IN):: varZ(1:NC_NN) ! z component of vector
  integer(I4P)::             E_IO          ! Input/Output inquiring flag: $0$ if IO is done, $> 0$ if IO is not done
  integer(I8P)::             n1            ! counter
  !---------------------------------------------------------------------------------------------------------------------------------

  !---------------------------------------------------------------------------------------------------------------------------------
  select case(f_out)
  case(f_out_ascii)
    write(unit=Unit_VTK,fmt='(A)',iostat=E_IO)'VECTORS '//trim(varname)//' int'
    write(unit=Unit_VTK,fmt='(3'//FI4P//')',iostat=E_IO)(varX(n1),varY(n1),varZ(n1),n1=1,NC_NN)
  case(f_out_binary)
    write(unit=Unit_VTK,iostat=E_IO)'VECTORS '//trim(varname)//' int'//end_rec
    write(unit=Unit_VTK,iostat=E_IO)(varX(n1),varY(n1),varZ(n1),n1=1,NC_NN)
    write(unit=Unit_VTK,iostat=E_IO)end_rec
  endselect
  return
  !---------------------------------------------------------------------------------------------------------------------------------
  endfunction VTK_VAR_VECT_I4