Sets the spectrum instances based on input spectrum array. This implementation is for omnidirectional spectrum in 1-d space (1d-1d)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(domain_type), | intent(inout) | :: | self | Domain instance |
||
real(kind=rk), | intent(in), | dimension(:,:) | :: | spectrum_array | Spectrum array |
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.
pure subroutine setSpectrumArray1d1d(self,spectrum_array)
!! Sets the spectrum instances based on input spectrum array.
!! This implementation is for omnidirectional spectrum in 1-d space (1d-1d)
class(domain_type),intent(inout) :: self
!! Domain instance
real(kind=rk),dimension(:,:),intent(in) :: spectrum_array
!! Spectrum array
integer(kind=ik) :: i,j
associate(lb => self % lb,ub => self % ub)
do concurrent(i=lb(1):ub(1),j=lb(2):ub(2))
call self % spectrum(i,j) % setSpectrum(spectrum_array(:,i))
enddo
endassociate
endsubroutine setSpectrumArray1d1d