Create a new iterator_t object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | dimension(:) | :: | N | Number of steps in each dimension |
|
real(kind=wp), | intent(in), | dimension(:) | :: | lB | Lower bounds in each dimension for real conversion |
|
real(kind=wp), | intent(in), | dimension(:) | :: | hB | Upper bounds in each dimension for real conversion |
New iterator object
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 newIterator(N,lB,hB) result(o)
!! Create a new iterator_t object
integer,dimension(:),intent(in)::N
!! Number of steps in each dimension
real(wp),dimension(:),intent(in)::lB
!! Lower bounds in each dimension for real conversion
real(wp),dimension(:),intent(in)::hB
!! Upper bounds in each dimension for real conversion
type(iterator_t)::o
!! New iterator object
integer::k
o%idx = [( 0 , k=1,size(N) )]
o%N = N-1
o%lB = lB
o%hB = hB
o%isDone = .false.
end function newIterator