Type to create and destroy N-dimenstional arrays for optimal control
Subroutine to create a single array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ndarray_oc_factory), | intent(inout) | :: | this | |||
class(pf_encap_t), | intent(inout), | allocatable | :: | x | ||
integer, | intent(in) | :: | level | |||
integer, | intent(in) | :: | shape(:) |
Subroutine to create an array of arrays
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ndarray_oc_factory), | intent(inout) | :: | this | |||
class(pf_encap_t), | intent(inout), | allocatable | :: | x(:) | ||
integer, | intent(in) | :: | n | |||
integer, | intent(in) | :: | level | |||
integer, | intent(in) | :: | shape(:) |
Subroutine to destroy an single array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ndarray_oc_factory), | intent(inout) | :: | this | |||
class(pf_encap_t), | intent(inout), | allocatable | :: | x | ||
integer, | intent(in) | :: | level | |||
integer, | intent(in) | :: | shape(:) |
Subroutine to destroy an array of arrays
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ndarray_oc_factory), | intent(inout) | :: | this | |||
class(pf_encap_t), | intent(inout), | allocatable | :: | x(:) | ||
integer, | intent(in) | :: | n | |||
integer, | intent(in) | :: | level | |||
integer, | intent(in) | :: | shape(:) |
type, extends(pf_factory_t) :: ndarray_oc_factory
contains
procedure :: create_single => ndarray_oc_create_single
procedure :: create_array => ndarray_oc_create_array
procedure :: destroy_single => ndarray_oc_destroy_single
procedure :: destroy_array => ndarray_oc_destroy_array
end type ndarray_oc_factory