jacobian_is_cached Function

public function jacobian_is_cached(mission, x)

True if x is the point of the Jacobian kept by the last function evaluation (func_with_stm).

Arguments

Type IntentOptional Attributes Name
type(mission_type), intent(in) :: mission
real(kind=wp), intent(in), dimension(:) :: x

Return Value logical


Called by

proc~~jacobian_is_cached~~CalledByGraph proc~jacobian_is_cached jacobian_is_cached proc~halo_grad halo_grad proc~halo_grad->proc~jacobian_is_cached proc~halo_grad_sparse halo_grad_sparse proc~halo_grad_sparse->proc~jacobian_is_cached

Source Code

    logical function jacobian_is_cached(mission,x)

    implicit none

    type(mission_type),intent(in) :: mission
    real(wp),dimension(:),intent(in) :: x

    jacobian_is_cached = .false.
    if (.not. mission%func_with_stm) return
    if (.not. allocated(mission%jac_cache_x) .or. .not. allocated(mission%jac_cache)) return
    if (size(mission%jac_cache_x) /= size(x)) return
    jacobian_is_cached = all(mission%jac_cache_x == x)

    end function jacobian_is_cached