!
!= GT_VARIABLE åž‹å¤‰æ•°ã®åŒå€¤åˆ¤å®š
!
! Authors::   Eizi TOYODA, Yasuhiro MORIKAWA
! Version::   $Id: gtvarequivalent.f90,v 1.3 2009-05-25 09:55:58 morikawa Exp $
! Tag Name::  $Name:  $
! Copyright:: Copyright (C) GFD Dennou Club, 2000-2005. All rights reserved.
! License::   See COPYRIGHT[link:../../COPYRIGHT]
!
! ä»¥ä¸‹ã®ã‚µãƒ–ãƒ«ãƒ¼ãƒãƒ³ã€é–¢æ•°ã¯ gtdata_generic ã‹ã‚‰
! gtdata_generic#operator(.equivalent.) ã¨ã—ã¦æä¾›ã•ã‚Œã¾ã™ã€‚

logical function GTVarEquivalent(var1, var2) result(result)
  !
  !== GT_VARIABLE åž‹å¤‰æ•°ã®åŒå€¤åˆ¤å®š
  !
  ! å¤‰æ•° <b>var1</b>, <b>var2</b> ã‚’æ¯”è¼ƒã—ã€åŒå€¤ã§ã‚ã‚‹å ´åˆã¯ .true. ã‚’ã€
  ! ãã†ã§ç„¡ã„å ´åˆã¯ .false. ã‚’è¿”ã—ã¾ã™ã€‚
  !
  use gtdata_types, only: GT_VARIABLE
  use gtdata_internal_map, only: var_class
  type(GT_VARIABLE), intent(in):: var1, var2
  integer:: class1, class2, cid1, cid2
continue
  call var_class(var1, class1, cid1)
  call var_class(var2, class2, cid2)
  result = (class1 == class2) .and. (cid1 == cid2)
end function GTVarEquivalent