HorizontalStaggerLoc.F90 Source File


Files dependent on this one

sourcefile~~horizontalstaggerloc.f90~~AfferentGraph sourcefile~horizontalstaggerloc.f90 HorizontalStaggerLoc.F90 sourcefile~dimspec.f90 DimSpec.F90 sourcefile~dimspec.f90->sourcefile~horizontalstaggerloc.f90 sourcefile~oomph.f90 oomph.F90 sourcefile~oomph.f90->sourcefile~horizontalstaggerloc.f90 sourcefile~oomph.f90->sourcefile~dimspec.f90 sourcefile~fieldspec.f90 FieldSpec.F90 sourcefile~oomph.f90->sourcefile~fieldspec.f90 sourcefile~fieldspec.f90->sourcefile~dimspec.f90 sourcefile~varconnpoint.f90 VarConnPoint.F90 sourcefile~varconnpoint.f90->sourcefile~oomph.f90 sourcefile~varspectype.f90 VarSpecType.F90 sourcefile~varspectype.f90->sourcefile~oomph.f90 sourcefile~mapl_generic.f90 MAPL_Generic.F90 sourcefile~mapl_generic.f90->sourcefile~varspectype.f90 sourcefile~varspec.f90 VarSpec.F90 sourcefile~mapl_generic.f90->sourcefile~varspec.f90 sourcefile~statespecification.f90 StateSpecification.F90 sourcefile~statespecification.f90->sourcefile~varspectype.f90 sourcefile~varspecmiscmod.f90 VarSpecMiscMod.F90 sourcefile~statespecification.f90->sourcefile~varspecmiscmod.f90 sourcefile~varconn.f90 VarConn.F90 sourcefile~varconn.f90->sourcefile~varconnpoint.f90 sourcefile~varconntype.f90 VarConnType.F90 sourcefile~varconn.f90->sourcefile~varconntype.f90 sourcefile~varconn.f90->sourcefile~varspec.f90 sourcefile~varconntype.f90->sourcefile~varconnpoint.f90 sourcefile~varspec.f90->sourcefile~varspectype.f90 sourcefile~varspecmiscmod.f90->sourcefile~varconnpoint.f90 sourcefile~varspecmiscmod.f90->sourcefile~varspectype.f90 sourcefile~varspecmiscmod.f90->sourcefile~varconn.f90 sourcefile~varspecmiscmod.f90->sourcefile~varconntype.f90 sourcefile~varspecmiscmod.f90->sourcefile~varspec.f90 sourcefile~comp_testing_driver.f90 Comp_Testing_Driver.F90 sourcefile~comp_testing_driver.f90->sourcefile~mapl_generic.f90 sourcefile~componentspecification.f90 ComponentSpecification.F90 sourcefile~componentspecification.f90->sourcefile~statespecification.f90 sourcefile~extdatagridcompmod.f90 ExtDataGridCompMod.F90 sourcefile~extdatagridcompmod.f90->sourcefile~mapl_generic.f90 sourcefile~extdatagridcompmod.f90->sourcefile~varspec.f90 sourcefile~extdatagridcompng.f90 ExtDataGridCompNG.F90 sourcefile~extdatagridcompng.f90->sourcefile~mapl_generic.f90 sourcefile~extdatagridcompng.f90->sourcefile~varspec.f90 sourcefile~genericcplcomp.f90 GenericCplComp.F90 sourcefile~genericcplcomp.f90->sourcefile~varspecmiscmod.f90 sourcefile~mapl.f90 MAPL.F90 sourcefile~mapl.f90->sourcefile~mapl_generic.f90 sourcefile~mapl.f90->sourcefile~varspecmiscmod.f90 sourcefile~mapl_capgridcomp.f90 MAPL_CapGridComp.F90 sourcefile~mapl_capgridcomp.f90->sourcefile~mapl_generic.f90 sourcefile~mapl_geosatmaskmod.f90 MAPL_GeosatMaskMod.F90 sourcefile~mapl_geosatmaskmod.f90->sourcefile~mapl_generic.f90 sourcefile~mapl_historycollection.f90 MAPL_HistoryCollection.F90 sourcefile~mapl_historycollection.f90->sourcefile~mapl_generic.f90 sourcefile~mapl_historygridcomp.f90 MAPL_HistoryGridComp.F90 sourcefile~mapl_historygridcomp.f90->sourcefile~mapl_generic.f90 sourcefile~mapl_historygridcomp.f90->sourcefile~varspecmiscmod.f90 sourcefile~mapl_orbgridcompmod.f90 MAPL_OrbGridCompMod.F90 sourcefile~mapl_orbgridcompmod.f90->sourcefile~mapl_generic.f90 sourcefile~mapl_stationsamplermod.f90 MAPL_StationSamplerMod.F90 sourcefile~mapl_stationsamplermod.f90->sourcefile~mapl_generic.f90 sourcefile~mapl_trajectorymod.f90 MAPL_TrajectoryMod.F90 sourcefile~mapl_trajectorymod.f90->sourcefile~mapl_generic.f90 sourcefile~maplgeneric.f90 MaplGeneric.F90 sourcefile~maplgeneric.f90->sourcefile~statespecification.f90 sourcefile~maplgeneric.f90->sourcefile~varconn.f90 sourcefile~maplgeneric.f90->sourcefile~varconntype.f90 sourcefile~maplgeneric.f90->sourcefile~varspecmiscmod.f90 sourcefile~test_varspec.pf Test_VarSpec.pf sourcefile~test_varspec.pf->sourcefile~varspec.f90 sourcefile~varconnvector.f90 VarConnVector.F90 sourcefile~varconnvector.f90->sourcefile~varconntype.f90 sourcefile~varspecptr.f90 VarSpecPtr.F90 sourcefile~varspecptr.f90->sourcefile~varspec.f90 sourcefile~varspecvector.f90 VarSpecVector.F90 sourcefile~varspecvector.f90->sourcefile~varspec.f90

Source Code

module oomph_HorizontalStaggerLoc
   implicit none
   private

   public :: HorizontalStaggerLoc
   public :: H_STAGGER_LOC_NONE
   public :: H_STAGGER_LOC_CENTER
   public :: H_STAGGER_LOC_TILE

   integer, parameter :: INVALID = -1

   ! Users should not be able to invent their own staggering, but we
   ! need to be able to declare type components of this type, so we
   ! cannot simply make the type private.  Instead we give it a
   ! default value that is invalid.  This class does not check the
   ! value, but higher level logic should check that returned values
   ! are of one of the defined parameters.
  
   type :: HorizontalStaggerLoc
      private
      integer :: i = INVALID
   contains
      procedure :: equal_to
      procedure :: not_equal_to
      generic :: operator(==) => equal_to
      generic :: operator(/=) => not_equal_to
   end type HorizontalStaggerLoc

   type(HorizontalStaggerLoc) :: H_STAGGER_LOC_NONE = HorizontalStaggerLoc(0)
   type(HorizontalStaggerLoc) :: H_STAGGER_LOC_CENTER = HorizontalStaggerLoc(2)
   type(HorizontalStaggerLoc) :: H_STAGGER_LOC_TILE = HorizontalStaggerLoc(3)
   
contains


   pure logical function equal_to(this, other)
      class(HorizontalStaggerLoc), intent(in) :: this
      type(HorizontalStaggerLoc), intent(in) :: other
      equal_to = this%i == other%i
   end function equal_to
   
   pure logical function not_equal_to(this, other)
      class(HorizontalStaggerLoc), intent(in) :: this
      type(HorizontalStaggerLoc), intent(in) :: other
      not_equal_to = .not. (this == other)
   end function not_equal_to
   
   
end module oomph_HorizontalStaggerLoc