Returns the frequency [Hz] array of the spectrum instance, reshaped to match the spectrum array shape. This method is most useful for conforming shape array in 2-d spectrum computations.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(spectrum_type), | intent(in) | :: | self | Spectrum instance |
Frequency [Hz]
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 function getFrequency2d(self) result(f)
!! Returns the frequency [Hz] array of the spectrum instance, reshaped to
!! match the spectrum array shape. This method is most useful for conforming
!! shape array in 2-d spectrum computations.
class(spectrum_type),intent(in) :: self !! Spectrum instance
real(kind=rk),dimension(:,:),allocatable :: f !! Frequency [Hz]
integer :: ndirs,nfreqs
integer :: ndir
nfreqs = size(self % f)
ndirs = size(self % th)
allocate(f(nfreqs,ndirs))
do concurrent(ndir = 1:ndirs)
f(:,ndir) = self % f
enddo
endfunction getFrequency2d