MockRegridder.F90 Source File


This file depends on

sourcefile~~mockregridder.f90~~EfferentGraph sourcefile~mockregridder.f90 MockRegridder.F90 sourcefile~mapl_abstractregridder.f90 MAPL_AbstractRegridder.F90 sourcefile~mockregridder.f90->sourcefile~mapl_abstractregridder.f90 sourcefile~mapl_keywordenforcer.f90 MAPL_KeywordEnforcer.F90 sourcefile~mockregridder.f90->sourcefile~mapl_keywordenforcer.f90 sourcefile~mapl_abstractregridder.f90->sourcefile~mapl_keywordenforcer.f90 sourcefile~base_base.f90 Base_Base.F90 sourcefile~mapl_abstractregridder.f90->sourcefile~base_base.f90 sourcefile~constants.f90 Constants.F90 sourcefile~mapl_abstractregridder.f90->sourcefile~constants.f90 sourcefile~mapl_exceptionhandling.f90 MAPL_ExceptionHandling.F90 sourcefile~mapl_abstractregridder.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~mapl_memutils.f90 MAPL_MemUtils.F90 sourcefile~mapl_abstractregridder.f90->sourcefile~mapl_memutils.f90 sourcefile~regridderspec.f90 RegridderSpec.F90 sourcefile~mapl_abstractregridder.f90->sourcefile~regridderspec.f90 sourcefile~regridderspecroutehandlemap.f90 RegridderSpecRouteHandleMap.F90 sourcefile~mapl_abstractregridder.f90->sourcefile~regridderspecroutehandlemap.f90 sourcefile~base_base.f90->sourcefile~mapl_keywordenforcer.f90 sourcefile~base_base.f90->sourcefile~constants.f90 sourcefile~mapl_range.f90 MAPL_Range.F90 sourcefile~base_base.f90->sourcefile~mapl_range.f90 sourcefile~maplgrid.f90 MaplGrid.F90 sourcefile~base_base.f90->sourcefile~maplgrid.f90 sourcefile~internalconstants.f90 InternalConstants.F90 sourcefile~constants.f90->sourcefile~internalconstants.f90 sourcefile~mathconstants.f90 MathConstants.F90 sourcefile~constants.f90->sourcefile~mathconstants.f90 sourcefile~physicalconstants.f90 PhysicalConstants.F90 sourcefile~constants.f90->sourcefile~physicalconstants.f90 sourcefile~mapl_errorhandling.f90 MAPL_ErrorHandling.F90 sourcefile~mapl_exceptionhandling.f90->sourcefile~mapl_errorhandling.f90 sourcefile~mapl_throw.f90 MAPL_Throw.F90 sourcefile~mapl_exceptionhandling.f90->sourcefile~mapl_throw.f90 sourcefile~mapl_memutils.f90->sourcefile~base_base.f90 sourcefile~mapl_memutils.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~mapl_comms.f90 MAPL_Comms.F90 sourcefile~mapl_memutils.f90->sourcefile~mapl_comms.f90 sourcefile~mapl_memutils.f90->sourcefile~mapl_errorhandling.f90 sourcefile~mapl_io.f90 MAPL_IO.F90 sourcefile~mapl_memutils.f90->sourcefile~mapl_io.f90 sourcefile~shmem.f90 Shmem.F90 sourcefile~mapl_memutils.f90->sourcefile~shmem.f90 sourcefile~regridderspec.f90->sourcefile~mapl_keywordenforcer.f90 sourcefile~regridderspec.f90->sourcefile~mapl_errorhandling.f90 sourcefile~mapl_gridmanager.f90 MAPL_GridManager.F90 sourcefile~regridderspec.f90->sourcefile~mapl_gridmanager.f90 sourcefile~regridmethods.f90 RegridMethods.F90 sourcefile~regridderspec.f90->sourcefile~regridmethods.f90 sourcefile~regridderspecroutehandlemap.f90->sourcefile~regridderspec.f90

Files dependent on this one

sourcefile~~mockregridder.f90~~AfferentGraph sourcefile~mockregridder.f90 MockRegridder.F90 sourcefile~test_regriddermanager.pf Test_RegridderManager.pf sourcefile~test_regriddermanager.pf->sourcefile~mockregridder.f90

Source Code

#define _SUCCESS      0
#define _FAILURE     1
#define _VERIFY(A)   if(  A/=0) then; if(present(rc)) rc=A; PRINT *, Iam, __LINE__; return; endif
#define _ASSERT(A)   if(.not.A) then; if(present(rc)) rc=_FAILURE; PRINT *, Iam, __LINE__; return; endif
#define _RETURN(A)   if(present(rc)) rc=A; return
#include "unused_dummy.H"

module MockRegridderMod
   use MAPL_AbstractRegridderMod
   use, intrinsic :: iso_fortran_env, only: REAL64
   implicit none
   private

   public :: MockRegridder

   type, extends(AbstractRegridder) :: MockRegridder
      private
      character(len=:), allocatable :: name
   contains
      procedure :: regrid_scalar_2d_real64
      procedure :: get_name
      procedure :: initialize_subclass
   end type MockRegridder

   interface MockRegridder
      module procedure newMockRegridder
   end interface MockRegridder

   character(len=*), parameter :: MOD_NAME = 'MockRegridder::'

contains


   function newMockRegridder(name) result(regridder)
      type (MockRegridder) :: regridder
      character(len=*), intent(in) :: name

      regridder%name = name

   end function newMockRegridder


   subroutine regrid_scalar_2d_real64(this, q_in, q_out, rc)
      class (MockRegridder), intent(in) :: this
      real(kind=REAL64), intent(in) :: q_in(:,:)
      real(kind=REAL64), intent(out) :: q_out(:,:)
      integer, optional, intent(out) :: rc
      character(len=*), parameter :: Iam = MOD_NAME//'regrid_scalar_2d_real64'

      _UNUSED_DUMMY(this)
      _UNUSED_DUMMY(q_in)

      q_out = 0
      _RETURN(_SUCCESS)

   end subroutine regrid_scalar_2d_real64

   function get_name(this) result(name)
      class (MockRegridder), intent(in) :: this
      character(len=:), allocatable :: name

      name = this%name

   end function get_name


   subroutine initialize_subclass(this, unusable, rc)
      use MAPL_KeywordEnforcerMod
      class (MockRegridder), intent(inout) :: this
      class (KeywordEnforcer), optional, intent(in) :: unusable
      integer, optional, intent(out) :: rc

      _UNUSED_DUMMY(this)
      _UNUSED_DUMMY(unusable)
      _UNUSED_DUMMY(rc)

   end subroutine initialize_subclass


end module MockRegridderMod