CouplerMetaComponent Derived Type

type, public :: CouplerMetaComponent


Inherits

type~~couplermetacomponent~~InheritsGraph type~couplermetacomponent CouplerMetaComponent type~componentdriverptrvector ComponentDriverPtrVector type~couplermetacomponent->type~componentdriverptrvector sources type~componentdrivervector ComponentDriverVector type~couplermetacomponent->type~componentdrivervector consumers type~extensionaction ExtensionAction type~couplermetacomponent->type~extensionaction action type~vector_wrapper~21 vector_wrapper type~componentdriverptrvector->type~vector_wrapper~21 elements type~vector_wrapper~22 vector_wrapper type~componentdrivervector->type~vector_wrapper~22 elements type~componentdriverptr ComponentDriverPtr type~vector_wrapper~21->type~componentdriverptr item type~componentdriver ComponentDriver type~vector_wrapper~22->type~componentdriver item type~componentdriverptr->type~componentdriver ptr

Constructor

public interface CouplerMetaComponent


Type-Bound Procedures

procedure, public :: add_consumer

  • private function add_consumer(this) result(consumer)

    Arguments

    Type IntentOptional Attributes Name
    class(CouplerMetaComponent), intent(inout), target :: this

    Return Value class(ComponentDriver), pointer

procedure, public :: add_source

  • private subroutine add_source(this, source)

    Arguments

    Type IntentOptional Attributes Name
    class(CouplerMetaComponent), intent(inout), target :: this
    type(GriddedComponentDriver), intent(in), pointer :: source

procedure, public :: clock_advance

  • private recursive subroutine clock_advance(this, importState, exportState, clock, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(CouplerMetaComponent), intent(inout) :: this
    type(ESMF_State), intent(inout) :: importState
    type(ESMF_State), intent(inout) :: exportState
    type(ESMF_Clock), intent(inout) :: clock
    integer, intent(out), optional :: rc

procedure, public :: initialize

  • private recursive subroutine initialize(this, importState, exportState, clock, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(CouplerMetaComponent), intent(inout) :: this
    type(ESMF_State), intent(inout) :: importState
    type(ESMF_State), intent(inout) :: exportState
    type(ESMF_Clock), intent(inout) :: clock
    integer, intent(out), optional :: rc

procedure, public :: invalidate

  • private recursive subroutine invalidate(this, importState, exportState, clock, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(CouplerMetaComponent) :: this
    type(ESMF_State) :: importState
    type(ESMF_State) :: exportState
    type(ESMF_Clock) :: clock
    integer, intent(out) :: rc

procedure, public :: invalidate_consumers

  • private recursive subroutine invalidate_consumers(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(CouplerMetaComponent), target :: this
    integer, intent(out) :: rc

procedure, public, non_overridable :: is_stale

  • private pure function is_stale(this)

    Arguments

    Type IntentOptional Attributes Name
    class(CouplerMetaComponent), intent(in) :: this

    Return Value logical

procedure, public, non_overridable :: is_up_to_date

  • private pure function is_up_to_date(this)

    Arguments

    Type IntentOptional Attributes Name
    class(CouplerMetaComponent), intent(in) :: this

    Return Value logical

procedure, public, non_overridable :: set_stale

  • private pure subroutine set_stale(this)

    Arguments

    Type IntentOptional Attributes Name
    class(CouplerMetaComponent), intent(inout) :: this

procedure, public, non_overridable :: set_up_to_date

  • private pure subroutine set_up_to_date(this)

    Arguments

    Type IntentOptional Attributes Name
    class(CouplerMetaComponent), intent(inout) :: this

procedure, public :: update

  • private recursive subroutine update(this, importState, exportState, clock, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(CouplerMetaComponent), intent(inout) :: this
    type(ESMF_State), intent(inout) :: importState
    type(ESMF_State), intent(inout) :: exportState
    type(ESMF_Clock), intent(inout) :: clock
    integer, intent(out), optional :: rc

procedure, public :: update_sources

  • private recursive subroutine update_sources(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(CouplerMetaComponent) :: this
    integer, intent(out) :: rc

Source Code

   type :: CouplerMetaComponent
      private
      class(ExtensionAction), allocatable :: action
      type(ComponentDriverPtrVector) :: sources
      type(ComponentDriverVector) :: consumers
      logical :: stale = .true.
   contains
      ! ESMF methods
      procedure :: initialize
      procedure :: update
      procedure :: invalidate
      procedure :: clock_advance

      ! Helper procedures
      procedure :: update_sources
      procedure :: invalidate_consumers
      procedure :: add_source
      procedure :: add_consumer

      ! Accessors
      procedure, non_overridable :: is_up_to_date
      procedure, non_overridable :: is_stale
      procedure, non_overridable :: set_up_to_date
      procedure, non_overridable :: set_stale
   end type CouplerMetaComponent