Construct a grid from x and y spacing
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | Grid values in x and y |
|
real(kind=wp), | intent(in), | dimension(:) | :: | y | Grid values in x and y |
Array x expanded into y
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.
function meshGridY(x,y) result(o)
!! Construct a grid from x and y spacing
real(wp),dimension(:),intent(in)::x,y
!! Grid values in x and y
real(wp),dimension(:,:),allocatable::o
!! Array x expanded into y
integer::Nx,Ny
integer::i,j
Nx = size(x)
Ny = size(y)
allocate(o(Nx,Ny))
forall(i=1:Nx,j=1:Ny) o(i,j) = y(j)
end function meshGridY