driver.F90 Source File


This file depends on

sourcefile~~driver.f90~~EfferentGraph sourcefile~driver.f90 driver.F90 sourcefile~abstractcomponent.f90 AbstractComponent.F90 sourcefile~driver.f90->sourcefile~abstractcomponent.f90 sourcefile~abstractframeworkcomponent.f90 AbstractFrameworkComponent.F90 sourcefile~driver.f90->sourcefile~abstractframeworkcomponent.f90 sourcefile~compositecomponent.f90 CompositeComponent.F90 sourcefile~driver.f90->sourcefile~compositecomponent.f90 sourcefile~concretecomposite.f90 ConcreteComposite.F90 sourcefile~driver.f90->sourcefile~concretecomposite.f90 sourcefile~maplgenericcomponent.f90 MaplGenericComponent.F90 sourcefile~driver.f90->sourcefile~maplgenericcomponent.f90 sourcefile~usercomponent.f90 UserComponent.F90 sourcefile~driver.f90->sourcefile~usercomponent.f90 sourcefile~surrogateframeworkcomponent.f90 SurrogateFrameworkComponent.F90 sourcefile~abstractframeworkcomponent.f90->sourcefile~surrogateframeworkcomponent.f90 sourcefile~compositecomponent.f90->sourcefile~abstractframeworkcomponent.f90 sourcefile~compositecomponent.f90->sourcefile~concretecomposite.f90 sourcefile~abstractcomposite.f90 AbstractComposite.F90 sourcefile~compositecomponent.f90->sourcefile~abstractcomposite.f90 sourcefile~concretecomposite.f90->sourcefile~abstractframeworkcomponent.f90 sourcefile~concretecomposite.f90->sourcefile~abstractcomposite.f90 sourcefile~stringcompositemap.f90 StringCompositeMap.F90 sourcefile~concretecomposite.f90->sourcefile~stringcompositemap.f90 sourcefile~maplgenericcomponent.f90->sourcefile~abstractcomponent.f90 sourcefile~maplgenericcomponent.f90->sourcefile~abstractframeworkcomponent.f90 sourcefile~maplgenericcomponent.f90->sourcefile~compositecomponent.f90 sourcefile~maplgenericcomponent.f90->sourcefile~concretecomposite.f90 sourcefile~baseframeworkcomponent.f90 BaseFrameworkComponent.F90 sourcefile~maplgenericcomponent.f90->sourcefile~baseframeworkcomponent.f90 sourcefile~entrypointvector.f90 EntryPointVector.F90 sourcefile~maplgenericcomponent.f90->sourcefile~entrypointvector.f90 sourcefile~mapl_errorhandling.f90 MAPL_ErrorHandling.F90 sourcefile~maplgenericcomponent.f90->sourcefile~mapl_errorhandling.f90 sourcefile~mapl_keywordenforcer.f90 MAPL_KeywordEnforcer.F90 sourcefile~maplgenericcomponent.f90->sourcefile~mapl_keywordenforcer.f90 sourcefile~maplcomponent.f90 MaplComponent.F90 sourcefile~maplgenericcomponent.f90->sourcefile~maplcomponent.f90 sourcefile~maplgrid.f90 MaplGrid.F90 sourcefile~maplgenericcomponent.f90->sourcefile~maplgrid.f90 sourcefile~openmp_support.f90 OpenMP_Support.F90 sourcefile~maplgenericcomponent.f90->sourcefile~openmp_support.f90 sourcefile~pflogger_stub.f90 pflogger_stub.F90 sourcefile~maplgenericcomponent.f90->sourcefile~pflogger_stub.f90 sourcefile~runentrypoint.f90 RunEntryPoint.F90 sourcefile~maplgenericcomponent.f90->sourcefile~runentrypoint.f90 sourcefile~usercomponent.f90->sourcefile~mapl_errorhandling.f90 sourcefile~usercomponent.f90->sourcefile~mapl_keywordenforcer.f90 sourcefile~usercomponent.f90->sourcefile~maplcomponent.f90 sourcefile~baseframeworkcomponent.f90->sourcefile~abstractcomponent.f90 sourcefile~baseframeworkcomponent.f90->sourcefile~abstractframeworkcomponent.f90 sourcefile~baseframeworkcomponent.f90->sourcefile~compositecomponent.f90 sourcefile~baseframeworkcomponent.f90->sourcefile~maplgrid.f90 sourcefile~baseframeworkcomponent.f90->sourcefile~surrogateframeworkcomponent.f90 sourcefile~componentspecification.f90 ComponentSpecification.F90 sourcefile~baseframeworkcomponent.f90->sourcefile~componentspecification.f90 sourcefile~entrypointvector.f90->sourcefile~runentrypoint.f90 sourcefile~mapl_throw.f90 MAPL_Throw.F90 sourcefile~mapl_errorhandling.f90->sourcefile~mapl_throw.f90 sourcefile~maplcomponent.f90->sourcefile~mapl_errorhandling.f90 sourcefile~maplcomponent.f90->sourcefile~mapl_keywordenforcer.f90 sourcefile~maplcomponent.f90->sourcefile~pflogger_stub.f90 sourcefile~maplcomponent.f90->sourcefile~surrogateframeworkcomponent.f90 sourcefile~basecomponent.f90 BaseComponent.F90 sourcefile~maplcomponent.f90->sourcefile~basecomponent.f90 sourcefile~maplgrid.f90->sourcefile~mapl_errorhandling.f90 sourcefile~maplgrid.f90->sourcefile~mapl_keywordenforcer.f90 sourcefile~maplgrid.f90->sourcefile~pflogger_stub.f90 sourcefile~constants.f90 Constants.F90 sourcefile~maplgrid.f90->sourcefile~constants.f90 sourcefile~mapl_sort.f90 MAPL_Sort.F90 sourcefile~maplgrid.f90->sourcefile~mapl_sort.f90 sourcefile~openmp_support.f90->sourcefile~entrypointvector.f90 sourcefile~openmp_support.f90->sourcefile~mapl_keywordenforcer.f90 sourcefile~openmp_support.f90->sourcefile~maplgrid.f90 sourcefile~openmp_support.f90->sourcefile~runentrypoint.f90 sourcefile~base_base.f90 Base_Base.F90 sourcefile~openmp_support.f90->sourcefile~base_base.f90 sourcefile~callbackmap.f90 CallbackMap.F90 sourcefile~openmp_support.f90->sourcefile~callbackmap.f90 sourcefile~mapl_esmf_interfaces.f90 MAPL_ESMF_Interfaces.F90 sourcefile~openmp_support.f90->sourcefile~mapl_esmf_interfaces.f90 sourcefile~mapl_exceptionhandling.f90 MAPL_ExceptionHandling.F90 sourcefile~openmp_support.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~pfl_keywordenforcer.f90 PFL_KeywordEnforcer.F90 sourcefile~pflogger_stub.f90->sourcefile~pfl_keywordenforcer.f90 sourcefile~wraparray.f90 WrapArray.F90 sourcefile~pflogger_stub.f90->sourcefile~wraparray.f90 sourcefile~stringcompositemap.f90->sourcefile~abstractcomposite.f90

Source Code

program main
   use ESMF
   use mapl_MaplGenericComponent
   use mapl_ConcreteComposite
   use UserComponent_mod
   use mapl_AbstractComponent
   use mapl_AbstractFrameworkComponent
   use mapl_CompositeComponent
   implicit none

   type(MaplGenericComponent), target :: tmp
   class(AbstractFrameworkComponent), pointer :: child_o => null()
   class(AbstractFrameworkComponent), pointer :: child_a => null()
   class(AbstractFrameworkComponent), pointer :: grandchild
   type(UserComponent) :: gcm
   type(UserComponent) :: agcm, ogcm
   type(UserComponent) :: dynamics, physics
   type(ESMF_Clock) :: clock
   integer :: status

   type(ConcreteComposite), target :: root_composite
   class(AbstractFrameworkComponent), pointer :: root

   call gcm%set_name('GCM')
   call agcm%set_name('AGCM')
   call ogcm%set_name('OGCM')
   call dynamics%set_name('DYN')
   call physics%set_name('PHYSICS')


   root_composite = ConcreteComposite(tmp)
   root => root_composite%get_component()
   call root%set_composite(root_composite) ! close the circular structure

   child_a => root%add_child_component('agcm', agcm)
   grandchild => child_a%add_child_component('dynamics', dynamics)
   grandchild => child_a%add_child_component('physics', physics)

   child_o => root%add_child_component('ogcm', ogcm)

   call root%run_child('agcm', clock, 'phase', rc=status)

   call child_a%run_child('dynamics', clock, 'phase', rc=status)
   call child_a%run_child('physics', clock, 'phase', rc=status)

   call root%run_child('ogcm', clock, 'phase', rc=status)
   
end program main