anchor.diff:      write(id,'(a)'),'$EndElements'
     end subroutine
     
  -  !> write scalar v into opened file id
  -  subroutine writeGMSHScal(id,v,grid,bind,vName,n,t)
  -    use moduleGrid
  -    integer,intent(in)::id !< the file id
  -    double precision,intent(in)::v(:) !< scalar to be written
  +  !> write scalar/vector/tensor v into opened file id
  +  subroutine writeGMSHScalVectTens(id,rank,v,grid,bind,vName,n,t)
  +    use moduleGrid
  +    integer,intent(in)::id !< the file id
  +    integer,intent(in)::rank !< rank of v
  +    double precision,intent(in)::v(*) !< data to be written
       type(typeGrid),intent(in)::grid !< grid on which v is defined
       integer,intent(in)::bind !< bind with Node/Facet/Block
       character(*),intent(in)::vName !< name of v
  
positive.code: !> file input/output
  module moduleFileIO
    private
    
    !> read GMSH file
    interface readGMSH
  
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_TENS,v,grid,bind,vName,n,t)
      else
        call writeGMSHScalVectTens(id,RANK_TENS,v,grid,bind,vName)
      end if
    end subroutine
    
  end module
  