Initialize the field.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
subroutine init()
!---------------------------------------------------------------------------------------------------------------------------------
!< Initialize the field.
!---------------------------------------------------------------------------------------------------------------------------------
real(R_P), parameter :: pi=4._R_P * atan(1._R_P) !< Pi greek.
integer(I_P) :: i !< Space counter.
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
h = 2._R_P * pi / Ni
do i=1, Ni
x(i) = h * (i - 1)
initial_state(i) = 10._R_P * sin(x(i))
enddo
return
!---------------------------------------------------------------------------------------------------------------------------------
endsubroutine init