mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-25 11:19:52 +01:00
24ea24ff24
Also build a main program that uses the parent module.
31 lines
713 B
Fortran
31 lines
713 B
Fortran
module parent
|
|
implicit none
|
|
|
|
type parent_type
|
|
real :: mother
|
|
real :: father
|
|
end type parent_type
|
|
|
|
interface
|
|
module subroutine init(p, mother, father)
|
|
type(parent_type), intent(out) :: p
|
|
real, intent(in) :: mother, father
|
|
end subroutine init
|
|
|
|
module subroutine harmonize(p)
|
|
type(parent_type), intent(inout) :: p
|
|
end subroutine harmonize
|
|
|
|
module function parent_weight(p) result(w)
|
|
type(parent_type), intent(in) :: p
|
|
real :: w
|
|
end function parent_weight
|
|
|
|
module function parent_distance(pa, pb) result(dist)
|
|
type(parent_type), intent(in) :: pa, pb
|
|
real :: dist
|
|
end function parent_distance
|
|
end interface
|
|
|
|
end module parent
|