Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | x-positions in grid |
|
real(kind=wp), | intent(in), | dimension(:) | :: | y | y-positions in grid |
Construct a 2d array of X values from a structured grid
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | Nx | ||||
integer, | public | :: | Ny | ||||
integer, | public | :: | i | ||||
integer, | public | :: | j |
function meshGridX(x,y) result(o)
!! Construct a 2d array of X values from a structured grid
real(wp),dimension(:),intent(in)::x
!! x-positions in grid
real(wp),dimension(:),intent(in)::y
!! y-positions in grid
real(wp),dimension(:,:),allocatable::o
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) = x(i)
end function meshGridX