equal_to.F90 Source File


This file depends on

sourcefile~~equal_to.f90~~EfferentGraph sourcefile~equal_to.f90 equal_to.F90 sourcefile~coordinateaxis.f90 CoordinateAxis.F90 sourcefile~equal_to.f90->sourcefile~coordinateaxis.f90 sourcefile~errorhandling.f90 ErrorHandling.F90 sourcefile~equal_to.f90->sourcefile~errorhandling.f90 sourcefile~mapl_range.f90 MAPL_Range.F90 sourcefile~coordinateaxis.f90->sourcefile~mapl_range.f90 sourcefile~pfio.f90 pFIO.F90 sourcefile~coordinateaxis.f90->sourcefile~pfio.f90 sourcefile~mapl_throw.f90 MAPL_Throw.F90 sourcefile~errorhandling.f90->sourcefile~mapl_throw.f90

Source Code

#include "MAPL_ErrLog.h"

submodule (mapl3g_CoordinateAxis) equal_to_smod
   use esmf, only: ESMF_UtilStringLowerCase
   use mapl_ErrorHandling
   use gftl2_StringVector
   use, intrinsic :: iso_fortran_env, only: REAL32, REAL64

contains
   
   elemental logical module function equal_to(a, b)
      type(CoordinateAxis), intent(in) :: a, b

      ! Do the fast checks first
      equal_to = size(a%centers) == size(b%centers)
      if (.not. equal_to) return
      equal_to = size(a%corners) == size(b%corners)
      if (.not. equal_to) return

      equal_to = all(a%centers == b%centers)
      if (.not. equal_to) return
      equal_to = all(a%corners == b%corners)
   end function equal_to

end submodule equal_to_smod