compute_nominal_function Subroutine

private subroutine compute_nominal_function(me, x, f0)

Compute the function at the nominal (unperturbed) x for all the rows in the sparsity pattern. This is done once per Jacobian evaluation so it can be reused by every column (or group) whose finite difference formula includes .

Type Bound

numdiff_type

Arguments

Type IntentOptional Attributes Name
class(numdiff_type), intent(inout) :: me
real(kind=wp), intent(in), dimension(:) :: x

nominal variable vector

real(kind=wp), intent(out), dimension(me%m) :: f0

function value at x (only the rows in the sparsity pattern are computed)


Calls

proc~~compute_nominal_function~~CallsGraph proc~compute_nominal_function numdiff_type%compute_nominal_function interface~unique unique proc~compute_nominal_function->interface~unique proc~unique_int unique_int interface~unique->proc~unique_int proc~unique_real unique_real interface~unique->proc~unique_real interface~expand_vector expand_vector proc~unique_int->interface~expand_vector interface~sort_ascending sort_ascending proc~unique_int->interface~sort_ascending proc~unique_real->interface~expand_vector proc~unique_real->interface~sort_ascending proc~expand_vector_int expand_vector_int interface~expand_vector->proc~expand_vector_int proc~expand_vector_real expand_vector_real interface~expand_vector->proc~expand_vector_real proc~sort_ascending_int sort_ascending_int interface~sort_ascending->proc~sort_ascending_int proc~sort_ascending_real sort_ascending_real interface~sort_ascending->proc~sort_ascending_real interface~swap swap proc~sort_ascending_int->interface~swap proc~sort_ascending_real->interface~swap proc~swap_int swap_int interface~swap->proc~swap_int proc~swap_real swap_real interface~swap->proc~swap_real

Called by

proc~~compute_nominal_function~~CalledByGraph proc~compute_nominal_function numdiff_type%compute_nominal_function proc~perturb_x_and_compute_f numdiff_type%perturb_x_and_compute_f proc~perturb_x_and_compute_f->proc~compute_nominal_function proc~perturb_x_and_compute_f_partitioned numdiff_type%perturb_x_and_compute_f_partitioned proc~perturb_x_and_compute_f_partitioned->proc~compute_nominal_function proc~compute_jacobian_for_sparsity numdiff_type%compute_jacobian_for_sparsity proc~compute_jacobian_for_sparsity->proc~perturb_x_and_compute_f proc~compute_jacobian_partitioned compute_jacobian_partitioned proc~compute_jacobian_partitioned->proc~perturb_x_and_compute_f_partitioned proc~compute_jacobian_standard compute_jacobian_standard proc~compute_jacobian_standard->proc~perturb_x_and_compute_f proc~compute_sparsity_random_2 compute_sparsity_random_2 proc~compute_sparsity_random_2->proc~compute_jacobian_for_sparsity

Source Code

    subroutine compute_nominal_function(me,x,f0)

    implicit none

    class(numdiff_type),intent(inout)     :: me
    real(wp),dimension(:),intent(in)      :: x   !! nominal variable vector
    real(wp),dimension(me%m),intent(out)  :: f0  !! function value at `x`
                                                 !! (only the rows in the
                                                 !! sparsity pattern are computed)

    if (me%exception_raised) return ! check for exceptions

    call me%compute_function(x,f0,unique(me%sparsity%irow,chunk_size=me%chunk_size))

    end subroutine compute_nominal_function