forked from GEOS-ESM/MAPL
-
Notifications
You must be signed in to change notification settings - Fork 1
/
BaseFrameworkComponent.F90
45 lines (33 loc) · 1.19 KB
/
BaseFrameworkComponent.F90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
module mapl_BaseFrameworkComponent
use ESMF
use mapl_SurrogateFrameworkComponent
use mapl_AbstractFrameworkComponent
use mapl_CompositeComponent
use mapl_AbstractComponent
use mapl_ComponentSpecification
use mapl_MaplGrid
implicit none
private
public :: BaseFrameworkComponent
type, abstract, extends(CompositeComponent) :: BaseFrameworkComponent
! private
class(AbstractComponent), allocatable :: component
type(ComponentSpecification) :: component_spec
type(MaplGrid) :: grid
contains
procedure :: set_component
procedure :: get_component
end type BaseFrameworkComponent
contains
subroutine set_component(this, component)
class(BaseFrameworkComponent), target, intent(inout) :: this
class(AbstractComponent), intent(in) :: component
this%component = component
call this%component%set_framework(this)
end subroutine set_component
function get_component(this) result(component)
class(AbstractComponent), pointer :: component
class(BaseFrameworkComponent), target, intent(in) :: this
component => this%component
end function get_component
end module mapl_BaseFrameworkComponent