Set the direction for the array (for higher-order derivatives)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(array_type), | intent(inout) | :: | this | |||
| real(kind=real32), | intent(in), | dimension(:) | :: | direction |
module subroutine set_direction(this, direction) !! Set the direction for the array (for higher-order derivatives) implicit none class(array_type), intent(inout) :: this real(real32), dimension(:), intent(in) :: direction if(allocated(this%direction)) deallocate(this%direction) if(size(this%val,1).ne.size(direction))then call stop_program('Direction size does not match array size in set_direction') end if this%direction = direction end subroutine set_direction