anchor.diff:      character(*),intent(in)::vName !< name of v
       integer,intent(in),optional::n !< time step index
       double precision,intent(in),optional::t !< time
  -    integer,parameter::DFLT_STR_LEN=400
  -    character(DFLT_STR_LEN)::tempStr
  -    
  -    select case(bind)
  -    case(BIND_NODE)
  -      write(id,'(a)'),'$NodeData'
  -    case(BIND_FACET,BIND_BLOCK)
  -      write(id,'(a)'),'$ElementData'
  -    case default
  -    end select
  -    write(id,'(i1)'),1 ! 1 string tag
  -    write(id,'(a,a,a)'),'"',vName,'"'
  -    write(id,'(i1)'),1 ! 1 real tag
  -    if(present(t))then
  -      write(id,*),t
  -    else
  -      write(id,*),0d0
  -    end if
  -    write(id,'(i1)'),3 ! 3 integer tags
  -    if(present(n))then
  -      write(id,*),n
  -    else
  -      write(id,*),0
  -    end if
  -    write(id,'(i1)'),9 ! 9-component tensor
  -    write(id,*),size(v,3)
  -    do i=1,size(v,3)
  -      select case(bind)
  -      case(BIND_NODE,BIND_BLOCK)
  -        write(tempStr,*),i,v(:,1,i),v(:,2,i),v(:,3,i)
  -      case(BIND_FACET)
  -        write(tempStr,*),i+grid%nBlock,v(:,1,i),v(:,2,i),v(:,3,i)
  -      case default
  -      end select
  -      write(id,'(a)'),trim(adjustl(tempStr))
  -    end do
  -    select case(bind)
  -    case(BIND_NODE)
  -      write(id,'(a)'),'$EndNodeData'
  -    case(BIND_FACET,BIND_BLOCK)
  -      write(id,'(a)'),'$EndElementData'
  -    case default
  -    end select
  +    
  +    if(present(n).and.present(t))then
  +      call writeGMSHScalVectTens(id,RANK_TENS,v,grid,bind,vName,n,t)
  +    else
  +      call writeGMSHScalVectTens(id,RANK_TENS,v,grid,bind,vName)
  +    end if
     end subroutine
     
   end module
  
positive.code:     else
        write(id,*),0
      end if
      write(id,'(i1)'),1 ! 1-component scalar
      write(id,*),size(v)
      do i=1,size(v)
        select case(bind)
        case(BIND_NODE,BIND_BLOCK)
          write(tempStr,*),i,v(i)
        case(BIND_FACET)
          write(tempStr,*),i+grid%nBlock,v(i)
        case default
        end select
        write(id,'(a)'),trim(adjustl(tempStr))
  
negative.code:     character(*),intent(in)::vName !< name of v
      integer,intent(in),optional::n !< time step index
      double precision,intent(in),optional::t !< time
      
      if(present(n).and.present(t))then
        call writeGMSHScalVectTens(id,RANK_VECT,v,grid,bind,vName,n,t)
      else
        call writeGMSHScalVectTens(id,RANK_VECT,v,grid,bind,vName)
      end if
    end subroutine
    
    !> write tensor v into opened file id
  